﻿@using Models;
@{
    ViewBag.Title = "品种查询";
}
@Html.ActionLink("创建", "Create")
@(Html.Telerik().Grid<Category>().Name("Category").DataBinding(databinding => databinding.Ajax().Select("AjaxCategoryIndex", "Category"))
                .DataKeys(keys =>
                {
                    keys.Add(s => s.ID);
                })
                .Columns(c =>
                {
                    c.Bound(cg => cg.CategoryName).Width(150);
                    c.Bound(cg => cg.Description).Width(150);
                    c.Bound(cg => cg.Sequence).Width(100);
                    c.Bound(cg => cg.ID).Title("操作").ClientTemplate("<a href='/Category/edit/" + "<#= ID #>'>编辑</a> | <a href='/Category/details/" + "<#= ID #>'>详细</a> | <a href='/Category/delete/" + "<#= ID #>'>删除</a>");
                })
                .Resizable(resizing => resizing.Columns(true))
                .Groupable()
                .Pageable(p => p.PageSize(20))
                .Sortable()
                .Filterable()
                .Scrollable(scrolling => scrolling.Height(350))
)
